(function($, global) {
  //反馈疑问
  let $form = $("#issue-form");
  let $submit = $form.find("button.submit");

  let verify = {};

  let fnInitAddReq = function(form) {
    return new FormData(form[0]);
  };

  let fnAddAjax = function (data) {
    fnUploadAjax('POST', 'issue/add', data, 'json', fnCommonAddSuccess, fnCommonAddError)
  }

  let fnTrigger = function() {
    $submit.click(function() {
      let req = fnInitAddReq($form);
      if (reqVerify(req, verify)) {
        fnLoading();
        fnAddAjax(req);
      }
    });
  };

  fnTrigger();
})(jQuery, window);
